#!/bin/bash

SIMBAOS_PORT_LIST=("16443","26443","10250","10256","6443","2379","2380","9999","179")

sh -c "firewall-cmd --add-port={$SIMBAOS_PORT_LIST}/tcp --permanent"

DATAPROTECT_PORT_TCP_LIST=("10000-10032","10100-10163","111","12001","12002-12005","123","12300","161","2049","2050","2051","2052","2053-2059","2181","22","24924","25080","25081","25082","25088","30063","30064","30065","30066","30067","30068","30170","30171","30172","3260","36061","36432","445","4500","500","53","59520-59559","6369","6432","762","8085","8086","8088","8089","8090","8092","9000","9092","9200","9300","18087","18088","18091")

sh -c "firewall-cmd --add-port={$DATAPROTECT_PORT_TCP_LIST}/tcp --permanent"


DATAPROTECT_PORT_UDP_LIST=("123","762","2053-2059","500","4500","53","111","2052","2051","2050")
sh -c "firewall-cmd --add-port={$DATAPROTECT_PORT_UDP_LIST}/udp --permanent"

firewall-cmd --reload
